<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link href="__UI__/css/bs3/dpl.css" rel="stylesheet" type="text/css" />
<link href="__UI__/css/bs3/bui.css" rel="stylesheet" type="text/css" />
<link href="__UI__/css/style.css" rel="stylesheet" type="text/css" />
<link href="__UI__/uploadify/uploadify.css" rel="stylesheet" type="text/css">
<style type="text/css">

#tabbox {
	width:90%;
	overflow:hidden;
	margin:0 auto;
}

.tabs {
	width: 100%;
	height: 32px;
	margin:20px auto;
}

.tabs li {
	float:left;
	height:31px;
	line-height:31px;
	border:1px solid #EAEAEA;
	border-left:none;
	margin-bottom: -1px;
	background: #e0e0e0;
	overflow: hidden;
	position: relative;
	border-radius:5px;
	margin:10px 5px;
}

.tabs li a {
	display: block;
	padding: 0 20px;
}

.tabs li a:hover {
	background: #ccc;
}	

.tabs .thistab,.tabs .thistab a:hover,.tabs .thistab a:active {
	background: #fff;
	border:1px solid #EAEAEA;
}

.tab_conbox {
	width:98%;
	border: 1px solid #EAEAEA;
	height:auto;
}

.tab_conbox li {
	padding:12px;
	font-size: 14px;
	overflow:hidden;
}

.form-horizontal .controls {
	float:none;
}

.controls .button {
	margin-top:-22px;
	margin-right:20px;
}

.control-group{
	margin:20px auto;
}

.control-group .controls{
	float:none;
	margin-bottom:40px;
}

.controls .con{
	width:85%;
	margin:20px auto 20px 130px;
	height:auto;
	line-height:30px;
	word-wrap: break-word; 
	word-break: normal;
}

.controls .cons{
	width:85%;
	margin:-20px auto 20px 140px;
	height:auto;
	min-height:30px;
	line-height:30px;
	word-wrap: break-word; 
	word-break: normal;
	overflow:hidden;
}

.hint h4{
	margin:10px auto;
}

.hint ul{
	width:100%;
}

.hint ul li {
	display:inline-block;
	margin:0px 10px 10px 10px;
	height:40px;
	line-height:40px;
	color:#fff;
}

</style>
<script type="text/javascript" src="__UI__/js/jquery-1.8.1.min.js"></script>
</head>
<body>
<script language="javascript">

var winID = null;
function openFullWindow(url,winname){
	var strFeatures = "left=0,screenX=0,top=0,screenY=0";  
	if (window.screen){
		var maxh = screen.availHeight-30;
		var maxw = screen.availWidth-10;
		strFeatures += ",height="+maxh;
		strFeatures += "innerHeight"+maxh;
		strFeatures += ",width="+maxw;
		strFeatures += "innerwidth"+maxw;
	}else{
		strFeatures +=",resizable"; 
	}
	winID = window.open(url,winname,strFeatures);
}

</script>
<div class="demo-content" style="margin-top:1%;">
    <div class="row" style="margin-left:10px;">
		<div style="text-align:center"><h2>{$scripts.scriptsname} - 演练总结</h2><hr></div>
        <div id="tabbox">
			<a class="button button-primary" onClick="window.location.reload();" style="margin-bottom:10px;">刷新本页</a>
            <div class="hint">
            	<h4>操作提示</h4>
                <ul>
                	<li>1、点击选择部门，进入部门总结</li>
                    <li>2、输入总结信息</li>
                    <li>3、点击结束演练，结束演练计时</li>
                </ul>
            </div>
            <form id="J_Form" action="{:U('Home/Record/edit')}" class="form-horizontal registerform" method="post" enctype="multipart/form-data">
				<div id="panel" class="" style="padding:10px;">
					<div class="control-group">
						<div class="controls">
							<label class="control-label"><h3>部门总结</h3></label>
							<div class="controls">
								<volist name="department" id="v" key="b">
								<a class="button button-primary" id="department{$b}">{$v}</a>
<script type="text/javascript">
	$(function () {       
		$('#department{$b}').click(function(){
			top.topManager.openPage({
				id:'department{$b}',
				title:'{$v}总结',
				href:'{:U("Home/Scripts/report", array("sid"=>I("get.sid"),"uid"=>session(C("AUTH_KEYS")),"mid"=>session("gid"),"pid"=>I("get.pid"),"did"=>$b,"rid"=>$record[id],"tid"=>$v))}',
			});
		 });
    });
</script>
								</volist>
							</div>
						</div>
					</div>
                    <div class="control-group">
			    <!--<label class="control-label"><s>*</s>演练主控官</label>-->
                        <label class="control-label"><s>*</s>演练总指挥</label>
                        <div class="controls">
                            <input type="text" name="management" id="management" datatype="*" nullmsg="请输入演练主控官！" data-tip="{text:'请输入演练主控官'}" style="width:600px;" />
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label"><s>*</s>演练记录人</label>
                        <div class="controls">
                            <input type="text" name="recordman" id="recordman" datatype="*" nullmsg="请输入演练记录人！" data-tip="{text:'请输入演练记录人'}" style="width:600px;" />
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label"><s>*</s>演练地点</label>
                        <div class="controls">
                            <input type="text" name="address" id="address" datatype="*" nullmsg="请输入演练地点！" data-tip="{text:'请输入演练地点'}" style="width:600px;" />
                        </div>
                    </div>
                    <div class="row actions-bar">
                        <div class="form-actions">
                            <input name="id" type="hidden" id="id" value="{$record.id}">
                            <input name="bid" type="hidden" id="bid" value="1">
                            <input name="end_time" type="hidden" id="eid" value="{$Think.const.NOW_TIME}">
                            <button type="submit" class="button button-primary" href="javascript:void(0)">结束演练</button>
                            <span id="msgdemo2"></span>
                        </div>
					</div>
                </div>
            </div>
    	</form>
    </div>        	
</div>	
<script type="text/javascript" src="__UI__/js/jquery.SuperSlide.js"></script>
<script type="text/javascript" src="__UI__/js/config.js"></script>
<script type="text/javascript" src="__UI__/js/bui.js"></script>
<script type="text/javascript" src="__UI__/js/Validform_v5.3.2_min.js"></script>
<script type="text/javascript">

	$(document).ready(function() {
		jQuery.jqtab = function(tabtit,tab_conbox,shijian) {
			$(tab_conbox).find("li").hide();
			$(tabtit).find("li:first").addClass("thistab").show(); 
			$(tab_conbox).find("li:first").show();
		
			$(tabtit).find("li").bind(shijian,function(){
			  $(this).addClass("thistab").siblings("li").removeClass("thistab"); 
				var activeindex = $(tabtit).find("li").index(this);
				$(tab_conbox).children().eq(activeindex).show().siblings().hide();
				return false;
			});
		
		};
		$.jqtab("#tabs", "#tab_conbox", "click");	
	});
	
	BUI.use('bui/form', function (Form) {
        new Form.Form({
            srcNode:'#J_Form'
        }).render();
    });
	
	$(function(){
		$(".registerform").Validform({
			tiptype:function(msg,o,cssctl){
				var objtip=$("#msgdemo2");
				cssctl(objtip,o.type);
				objtip.text(msg);
			},
			ajaxPost:true,
			callback:function(data){
				if(data.status == 'y'){
					top.topManager.closePage();
					top.topManager.openPage({
						id:'record',
						title:'演练记录',
						href:'{:U("Record/index")}',
					});
				}
			},
		});
	});

</script>
</body>
</html>
